package cn.ainit.yz.sprk;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ainit.yz.sprk.entity.Sprk;
import cn.ainit.yz.sprk.entity.SprkItem;

@Service
public class SprkServiceImpl implements SprkService{

	SprkDao sprkDao;
	
	@Resource
	public void setSprkDao(SprkDao sprkDao) {
		this.sprkDao = sprkDao;
	}
	
	@Override
	public boolean saveSprk(Sprk sprk, List<SprkItem> sprkItems)
			throws Exception {
		return sprkDao.saveSprk(sprk,sprkItems);
	}
	
	@Override
	public boolean updateSprk(Sprk sprk, List<SprkItem> sprkItems)
			throws Exception {
		return sprkDao.updateSprk(sprk,sprkItems);
	}
	@Override
	public String sprkToDaohuo(String sprkId, String oId) throws Exception {
		return this.sprkDao.sprkToDaohuo(sprkId, oId);
	}
	@Override
	public String getHId(String xtId) throws Exception {
		return this.sprkDao.getHId(xtId);
	}
}
